<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>权限管理</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		
		<link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css">		
		<script type="text/javascript" charset="utf-8" src="extjs/ext-all.js"></script>
		<script type="text/javascript" charset="utf-8" src="extjs/locale/ext-lang-zh_CN.js"></script>
		
		<link rel="stylesheet" href="res/css/list.css" type="text/css" />
		<script type="text/javascript" src="res/js/util.js"></script>
		<script type="text/javascript" src="dev/js/power.js"></script>
	</head>

	<body>
		<form name="form" method="post" action="">
			<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1"
				bordercolor="#799AE1" class="tableBorder">
				<tbody>
					<tr>
						<td align="center" colspan="4" style="height:23px;background:#4455aa;color:white;font-weight: bold;">
							<s:property value="nodeText" />
						</td>
					</tr>
					<tr bgcolor="#DEE5FA">
						<td colspan="4" align="left" class="txlrow">
							<img alt="新增" src="res/images/add.gif">&nbsp;&nbsp;<a href="javascript:showAddForm();">新增</a>
						</td>
					</tr>
					<tr align="center" bgcolor="#799AE1">
						<td width="4%" align="center" class=txlHeaderBackgroundAlternate>
							选定
						</td>
						<td width="6%" align="center" class="txlHeaderBackgroundAlternate">
							权限名称
						</td>
						<td width="6%" align="center" class=txlHeaderBackgroundAlternate>
							操作
						</td>
					</tr>
					<s:if test="powers==null || powers.size() == 0">
						<tr bgcolor="#DEE5FA">
							<td colspan="4" align="center" class="txlrow">暂无数据！</td>
						</tr>
					</s:if>
					<s:else>
						<s:iterator value="powers">
							<tr bgcolor="#DEE5FA">
								<td align=center class=txlrow>
									<input type="checkbox" name="chk" value="<s:property value='id'/>">
								</td>
								<td align="center" class="txlrow">
									<s:property value="typeName" />
								</td>
								<td align="center" class="txlrow">
									<img alt="修改" src="res/images/edit.gif">&nbsp;<a href="javascript:showUpdateForm(<s:property value='id'/>);">修改</a>
									<img alt="删除" src="res/images/delete.gif">&nbsp;<a href="javascript:deleteCmd(<s:property value='id'/>);">删除</a>
								</td>
							</tr>
						</s:iterator>
					</s:else>
					<tr bgcolor="#DEE5FA">
						<td colspan="4" align="center" bgcolor="#DEE5FA" class="txlrow">
							<span class="tablebody2">
								<input type="button" value="全选" name="Submit2" onClick="javascript:selectAll()" />
								<input type="button" value="取消全选" name="Submit2" onClick="javascript:unSelectAll();" />
								<input type="button" value="批量删除" name="Submit2" onClick="javascript:batchDel();" />
							</span>
							<input type="submit" name="ok" value="确定" class="but">
						</td>
					</tr>
				</tbody>
			</table>
		</FORM>
	</body>
</html>
